{% load i18n mptt_tags %}

{% for category, structure in categories|tree_info %}
  {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %}
    <a href="{{ category.get_absolute_url }}" title="{{ category.title }}">{{ category.title }}</a> 
    {% comment %}
    <span class="category_counter">{{ category.entries_published.count }}</span>
    {% endcomment %}
  {% for level in structure.closed_levels %}</li></ul>{% endfor %}
  {% empty %}
<ul>
  <li>
    {% trans "No categories yet." %}
  </li>
</ul>
{% endfor %}


